﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Sbook.Data;
namespace Sbook.Business
{
    public class ProductsService
    {
        private static ProductsController db = new  ProductsController();
        #region[Products_GetById]
        public static List<Data.ProductsInfo> Products_GetById(string Id)
        {
            return db.Products_GetById(Id);
        }
        #endregion
        #region[Products_GetByTop]
        public static List<Data.ProductsInfo> Products_GetByTop(string Top, string Where, string Order)
        {
            return db.Products_GetByTop(Top, Where, Order);
        }
        #endregion
        #region[Products_GetByAll]
        public static List<Data.ProductsInfo> Products_GetByAll()
        {
            return db.Products_GetByAll();
        }
        #endregion
        #region[Products_Paging]
        public static List<Data.ProductsInfo> Products_Paging(string CurentPage, string PageSize)
        {
            return db.Products_Paging(CurentPage, PageSize);
        }
        #endregion
        #region
        public static List<ProductsInfo> Products_GetByCatId_Paging(string CatId, string CurentPage, string PageSize)
        {
            return db.Products_GetByCatId_Paging(CatId, CurentPage, PageSize);
        }
        #endregion
        #region[Products_GetByCatId]
        public static List<ProductsInfo> Products_GetByCaId(string CaId)
        {
            return db.Products_GetByCaId(CaId);
        }
        #endregion


        #region[Products_Insert]
        public static bool Products_Insert(ProductsInfo data)
        {
            return db.Products_Insert(data);
        }
        #endregion
        #region[Products_Update]
        public static bool Products_Update(ProductsInfo data)
        {
            return db.Products_Update(data);
        }
        #endregion
        #region[Products_Delete]
        public static bool Products_Delete(string Id)
        {
            return db.Products_Delete(Id);
        }
        #endregion

        //Format Price
        public static List<Data.ProductsInfo> FomatPrice(List<Data.ProductsInfo> listInput)
        {
            return db.FormatPrice(listInput);
        }
        public static List<Data.ProductsInfo> FomatPrice1(List<Data.ProductsInfo> listInput)
        {
            return db.FormatPrice1(listInput);
        }
        public static List<Data.ProductsInfo> FormatSaleOff(List<Data.ProductsInfo> listInput)
        {
            return db.FormatSaleOff(listInput);
        }
    }
}